﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FubiManger.UI;

namespace FubiManger.Controls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class userveiwcontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public userveiwcontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        /// <summary>
        /// 头像
        /// </summary>
        public string cover { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string username { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        public string time { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public string uid { get; set; }
        /// <summary>
        /// 商户ID
        /// </summary>
        public string merchantid { get; set; }
        private void userveiwcontrol_Load(object sender, EventArgs e)
        {
            //imgcover.ResourceID = @"C:\fbheard\" + cover;
            if (lblusername.Text.Length == 11)
                lblusername.Text = lblusername.Text.Substring(0, 3) + "****" + lblusername.Text.Substring(7, 4);
            
            //if (!string.IsNullOrEmpty(time))
            //    lbluserdate.Text = Convert.ToDateTime(time).ToString("yyyy-MM-dd");
            //lbluserid.Text = uid;//用户ID
        }

        private void panel1_Press(object sender, EventArgs e)
        {
            UserinfoForm frm = new UserinfoForm();
            frm.uid = lbluserid.Text;
            frm.merchantid = merchantid;//商户ID
            this.Form.Show(frm, true);
        }
    }
}